/*
 * Copyright (c) 2006, 2023, webrx.cn All rights reserved.
 *
 */

package org.abc;

/**
 * <p>Project: jse2303 - Rand1
 * <p>Powered by webrx On 2023-07-10 17:15:34
 * <p>描述：<p>
 *
 * @author webrx [webrx@126.com]
 * @version 1.0
 * @since 17
 */
public class Rand2 {
    public static void main(String[] args) {
        //Math.random()  1 5
        for (int i = 0; i < 10; i++) {
            //0.00000001 * 5 0.00000005 0.0 0
            //0.99999999 * 5 4.5 5
            //System.out.println(Math.round(Math.random() * 5)); //0 - 5
            System.out.println(Math.round(Math.random() * (10 - 1)) + 1);//1 - 10
        }

        System.out.println(Math.random() > .5 ? "YES" : "NO");
    }
}
